package com.suray.basic.wcs.plc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.suray.commin.annotation.Excel;
import com.suray.commin.core.utils.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wcs_plc_log")
public class PlcLogDB extends BaseModel implements Serializable {

    private static final long serialVersionUID = 5129798825031421233L;

    @TableId(value = "plc_log_id", type = IdType.AUTO)
    private Integer plcLogId;     // 接口日志主键id

    @Excel(name = "任务编号")
    private Integer taskId;

    @Excel(name = "设备名称")
    private String deviceName;

    @Excel(name = "接口描述")
    private String plcMethodDetail;

    @Excel(name = "接口发送参数")
    private String plcSendParams;

    @Excel(name = "接口返回参数")
    private String plcReturnParams;

    @Excel(name = "发送时间")
    private Date sendTime;

    @Excel(name = "耗时")
    private Long useTime;

    @TableField(exist = false)
    @Excel(name = "发送时间开始")
    private Date sendTimeStart;

    @TableField(exist = false)
    @Excel(name = "发送时间结束")
    private Date sendTimeEnd;

    @Override
    public String toString() {
        return "PlcLogdb{" +
                "deviceName='" + deviceName + '\'' +
                ", plcMethodDetail='" + plcMethodDetail + '\'' +
                ", plcSendParams='" + plcSendParams + '\'' +
                ", plcReturnParams='" + plcReturnParams + '\'' +
                ", sendTime=" + sendTime +
                ", useTime=" + useTime +
                ", sendTimeStart=" + sendTimeStart +
                ", sendTimeEnd=" + sendTimeEnd +
                '}';
    }
}
